<?php
declare (strict_types = 1);

namespace app\validate;

use think\Validate;

class Member extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名'	=>	['规则1','规则2'...]
     *
     * @var array
     */
	protected $rule =   [
		'username'  => 'require|max:25',
		'mobile'   => 'require|max:25',
		'email' => 'email',
	];
    
    /**
     * 定义错误信息
     * 格式：'字段名.规则名'	=>	'错误信息'
     *
     * @var array
     */
	protected $message  =   [
		'username.require' => '名称必须',
		'mobile.require'     => '手机号码不能为空',
		'email'        => '邮箱格式错误',
	];
}
